package com.youlv.yl.entity.hotel;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * <p>
 * 订单表 
 * </p>
 *
 * @author fenghe
 * @since 2022-01-19
 */
@Data
@TableName("t_order")
@ApiModel(value = "Order对象", description = "订单表 ")
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("订单编号")
    @TableField("`no`")
    private String no;

    @ApiModelProperty("总金额")
    @TableField("totalmoney")
    private Double totalmoney;

    @ApiModelProperty("支付金额")
    @TableField("freemoney")
    private Double freemoney;

    @ApiModelProperty("优惠")
    @TableField("paymoney")
    private Double paymoney;

    @ApiModelProperty("收货地址")
    @TableField("aid")
    private Long aid;

    @ApiModelProperty("收货人姓名")
    @TableField("uid")
    private Long uid;

    /**
     * a.已下单 待支付 1
     * b.已付款 待发货 2
     * c.已发货 待收货 3.
     * d.已收货 待确认 4
     * e.已确认 待评价 5
     * f.已评价 6
     * g.已超时7
     * h.已取消 8
     * i.已售后 9*/
    @ApiModelProperty("订单状态")
    @TableField("flag")
    private Integer flag;

    @ApiModelProperty("下单时间")
    @TableField("ctime")
    private Date ctime;

    @TableField("info")
    private String info;

    public Order(String no, double totalmoney, double freemoney, double paymoney, long aid, long uid, String info) {
        this.no = no;
        this.totalmoney = totalmoney;
        this.freemoney = freemoney;
        this.paymoney = paymoney;
        this.aid = aid;
        this.uid = uid;
        this.info = info;
        this.flag=1;
        this.ctime=new Date();
    }

}
